import 'package:xin_he/generated/json/base/json_convert_content.dart';
import 'package:xin_he/page/mine/xin_he_mine_orders/xin_he_mine_order_detail/xin_he_new_order_detail_entity.dart';

XinHeNewOrderDetailEntity $XinHeNewOrderDetailEntityFromJson(Map<String, dynamic> json) {
	final XinHeNewOrderDetailEntity xinHeNewOrderDetailEntity = XinHeNewOrderDetailEntity();
	final String? id = jsonConvert.convert<String>(json['id']);
	if (id != null) {
		xinHeNewOrderDetailEntity.id = id;
	}
	final String? fUserId = jsonConvert.convert<String>(json['fUserId']);
	if (fUserId != null) {
		xinHeNewOrderDetailEntity.fUserId = fUserId;
	}
	final String? code = jsonConvert.convert<String>(json['code']);
	if (code != null) {
		xinHeNewOrderDetailEntity.code = code;
	}
	final dynamic payTime = jsonConvert.convert<dynamic>(json['payTime']);
	if (payTime != null) {
		xinHeNewOrderDetailEntity.payTime = payTime;
	}
	final double? orderFee = jsonConvert.convert<double>(json['orderFee']);
	if (orderFee != null) {
		xinHeNewOrderDetailEntity.orderFee = orderFee;
	}
	final double? orderPayFee = jsonConvert.convert<double>(json['orderPayFee']);
	if (orderPayFee != null) {
		xinHeNewOrderDetailEntity.orderPayFee = orderPayFee;
	}
	final String? status = jsonConvert.convert<String>(json['status']);
	if (status != null) {
		xinHeNewOrderDetailEntity.status = status;
	}
	final String? distributionType = jsonConvert.convert<String>(json['distributionType']);
	if (distributionType != null) {
		xinHeNewOrderDetailEntity.distributionType = distributionType;
	}
	final String? buyerRemark = jsonConvert.convert<String>(json['buyerRemark']);
	if (buyerRemark != null) {
		xinHeNewOrderDetailEntity.buyerRemark = buyerRemark;
	}
	final String? createTime = jsonConvert.convert<String>(json['createTime']);
	if (createTime != null) {
		xinHeNewOrderDetailEntity.createTime = createTime;
	}
	final int? orderAmount = jsonConvert.convert<int>(json['orderAmount']);
	if (orderAmount != null) {
		xinHeNewOrderDetailEntity.orderAmount = orderAmount;
	}
	final dynamic fGoodsId = jsonConvert.convert<dynamic>(json['fGoodsId']);
	if (fGoodsId != null) {
		xinHeNewOrderDetailEntity.fGoodsId = fGoodsId;
	}
	final dynamic fGoodsPriceId = jsonConvert.convert<dynamic>(json['fGoodsPriceId']);
	if (fGoodsPriceId != null) {
		xinHeNewOrderDetailEntity.fGoodsPriceId = fGoodsPriceId;
	}
	final int? zoneType = jsonConvert.convert<int>(json['zoneType']);
	if (zoneType != null) {
		xinHeNewOrderDetailEntity.zoneType = zoneType;
	}
	final List<XinHeNewOrderDetailOrderItems>? orderItems = jsonConvert.convertListNotNull<XinHeNewOrderDetailOrderItems>(json['orderItems']);
	if (orderItems != null) {
		xinHeNewOrderDetailEntity.orderItems = orderItems;
	}
	final String? orderAddress = jsonConvert.convert<String>(json['orderAddress']);
	if (orderAddress != null) {
		xinHeNewOrderDetailEntity.orderAddress = orderAddress;
	}
	return xinHeNewOrderDetailEntity;
}

Map<String, dynamic> $XinHeNewOrderDetailEntityToJson(XinHeNewOrderDetailEntity entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['id'] = entity.id;
	data['fUserId'] = entity.fUserId;
	data['code'] = entity.code;
	data['payTime'] = entity.payTime;
	data['orderFee'] = entity.orderFee;
	data['orderPayFee'] = entity.orderPayFee;
	data['status'] = entity.status;
	data['distributionType'] = entity.distributionType;
	data['buyerRemark'] = entity.buyerRemark;
	data['createTime'] = entity.createTime;
	data['orderAmount'] = entity.orderAmount;
	data['fGoodsId'] = entity.fGoodsId;
	data['fGoodsPriceId'] = entity.fGoodsPriceId;
	data['zoneType'] = entity.zoneType;
	data['orderItems'] =  entity.orderItems?.map((v) => v.toJson()).toList();
	data['orderAddress'] = entity.orderAddress;
	return data;
}

XinHeNewOrderDetailOrderItems $XinHeNewOrderDetailOrderItemsFromJson(Map<String, dynamic> json) {
	final XinHeNewOrderDetailOrderItems xinHeNewOrderDetailOrderItems = XinHeNewOrderDetailOrderItems();
	final String? goodsId = jsonConvert.convert<String>(json['goodsId']);
	if (goodsId != null) {
		xinHeNewOrderDetailOrderItems.goodsId = goodsId;
	}
	final int? goodsPriceId = jsonConvert.convert<int>(json['goodsPriceId']);
	if (goodsPriceId != null) {
		xinHeNewOrderDetailOrderItems.goodsPriceId = goodsPriceId;
	}
	final int? goodsAmount = jsonConvert.convert<int>(json['goodsAmount']);
	if (goodsAmount != null) {
		xinHeNewOrderDetailOrderItems.goodsAmount = goodsAmount;
	}
	final double? itemPrice = jsonConvert.convert<double>(json['itemPrice']);
	if (itemPrice != null) {
		xinHeNewOrderDetailOrderItems.itemPrice = itemPrice;
	}
	final String? goodsName = jsonConvert.convert<String>(json['goodsName']);
	if (goodsName != null) {
		xinHeNewOrderDetailOrderItems.goodsName = goodsName;
	}
	final String? iconPath = jsonConvert.convert<String>(json['iconPath']);
	if (iconPath != null) {
		xinHeNewOrderDetailOrderItems.iconPath = iconPath;
	}
	return xinHeNewOrderDetailOrderItems;
}

Map<String, dynamic> $XinHeNewOrderDetailOrderItemsToJson(XinHeNewOrderDetailOrderItems entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['goodsId'] = entity.goodsId;
	data['goodsPriceId'] = entity.goodsPriceId;
	data['goodsAmount'] = entity.goodsAmount;
	data['itemPrice'] = entity.itemPrice;
	data['goodsName'] = entity.goodsName;
	data['iconPath'] = entity.iconPath;
	return data;
}